package com.kfm.pm;

public class Son extends Father {

    public static int a = 2;

    public int b = 2;

    public static int c = 20;

    public int d = 21;

    private String school;

    public Son(String name, int age, String school) {
        super(name, age); // 调用父类的构造  public Father(String name, int age)
        this.school = school;
    }

    public void printSchool() {
        System.out.println("school:" + school);
    }

    public static void print() {
        System.out.println("Son");
    }

    public void print1() {

    }


    @Override
    void printInfo() {
        // super.方法名() 表示调用父类的方法  this.方法名() 调用本类中的方法
        super.printInfo();
        System.out.println("school:" + school);
    }
}
